import os

def getFileSize(filePath, size=0):
  for root, dirs, files in os.walk(filePath):
    print(root)
    print('####')
    print(dirs)
    print('####')
    print(files)
    print('####')
    for f in files:
        size += os.path.getsize(os.path.join(root, f))
        print(f)
    print('++++')
  return size

if __name__ == '__main__':
  size = getFileSize('./test')
  print('Total size is: %.2f B'%(size))